﻿using BUS;
using DAO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OnlineDigitalCameraWebsite.Users
{
    public partial class TemplateUsers : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int b = int.Parse(Session["LoaiThanhVien"].ToString());
            if (b != 2)
            {
                Response.Redirect("/DangNhap.aspx");
            }
            if (!IsPostBack)
            {
                UsersBUS db = new UsersBUS();
                int idu = int.Parse(Session["userid"].ToString());
                User st = new User();
                st = db.GetByUserId(idu);
                lblUserName.Text = st.userName;
            }
            
        }
    }
}